<?php
header("Content-Type: text/html; charset=gbk");
require '../../packages/connect_database.php';
mysql_select_db("user");
$query_result = mysql_query("SELECT * FROM user WHERE phone = '{$_GET["user"]}' AND subAccountSid <> ''");
if(mysql_num_rows($query_result) > 0) {
	$user = mysql_fetch_row($query_result);
	if($user[7] == $_GET["pwd"]) {
		if(isset($_GET["mobile"]))
			setcookie("mobile",$_GET["mobile"],time() + 24 * 3600,'/');
        setcookie("car_job",$user[0],time() + 24 * 3600,'/');
        setcookie("name",$user[1],time() + 24 * 3600,'/');
        setcookie("phone",$user[2],time() + 24 * 3600,'/');
		setcookie("voipId",$user[5],time() + 24 * 3600,'/');
		setcookie("voipPwd",$user[6],time() + 24 * 3600,'/');
        setcookie("pwd",$user[7],time() + 24 * 3600,'/');
		echo "{$user[5]}_{$user[6]}";
	} else
		echo "false";
} else
	echo "false";
